//
//  TFAwardPromptButton.swift
//  TalkfunSDKDemo
//
//  Created by 莫瑞权 on 2022/5/5.
//  Copyright © 2022 Talkfun. All rights reserved.
//

import UIKit

class TFAwardPromptButton: UIButton {

    @objc public let image1 = UIImageView()
    @objc public let lab1 = UILabel()
    @objc public let lab2 = UILabel()
 
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.image1.image = UIImage.init(named: "HTLive.bundle/trophyTips")
        self.addSubview(self.image1)
        
        
      self.lab1.textAlignment = .center
      self.lab1.font = UIFont.PingFang(size: 14)
      self.lab1.textColor = UIColor(red: 23/255.0, green: 145/255.0, blue: 251/255.0, alpha: 1)
     self.addSubview(self.lab1)
       

     self.lab2.font =  UIFont.PingFang(size: 14)
     self.lab2.textColor = UIColor(red: 226/255.0, green: 231/255.0, blue: 240/255.0, alpha: 1)

     self.addSubview(self.lab2)
     self.lab2.text = "获得了一个奖杯"
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    override func layoutSubviews() {
        super.layoutSubviews()
        self.image1.frame = CGRect(x: 15, y: (self.frame.size.height - 18)/2, width: 18, height: 18)
      
        self.lab1.frame = CGRect(x: 15+18+6.5, y: (self.frame.size.height - 18)/2, width: 50, height: 18)
    
        self.lab2.frame = CGRect(x: self.frame.size.width - 15 - 100, y: (self.frame.size.height - 18)/2 , width: 100, height: 18)
       
    }
}
